package com.zdsoft.wms.service.impl;

import com.zdsoft.wms.bean.User;
import com.zdsoft.wms.dao.UserRepository;
import com.zdsoft.wms.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {


    @Autowired
    UserRepository userRepository;

    @Override
    public User findByNameAndPassword(String name, String password) {
        return userRepository.findByNameAndPassword(name,password);
    }

    @Override
    public User findById(int id) {
        return userRepository.findById(id);
    }

    @Override
    public List<User> findAllBySerstationId(int serstationId) {
        return userRepository.findAllBySerstationId(serstationId);
    }
}
